import axios from 'axios'
export default{
  hideTrainList:({commit})=>{
    commit('hideTrainList');
  },
  showTrainList:({commit})=>{
    commit('showTrainList');
  },
  getDetailData:({commit},id)=>{
    //每篇文章的ID
    var details={};
    axios.get('http://www.gengyong.com.cn/api/advice-detail',{
      params:{
        id:id
      }
    }).then(function(res){
      details=res.data.info;
      commit('getDetailData',details);
    }).catch(function(err){
      console.log(err);
    });

  }

}
